package com.quick.develop.flowable.domain.vo.process;

import com.quick.develop.flowable.domain.BpmBaseDO;
import com.quick.develop.flowable.enums.BpmExecuteCmd;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Map;

/**
 * @author junyuan.liu
 * @description:  提供给其他模块使用 转换成对应的VO
 * @date 2022/6/10 15:11
 */
@ApiModel("管理后台 - 流程 VO")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Data
public class BpmProcessReqVO extends BpmBaseDO {
    private static final long serialVersionUID = 426371473277086449L;

    /**
     * {@link BpmExecuteCmd}
     */
    @ApiModelProperty(value = "处理类型", required = true)
    @NotEmpty(message = "操作类型不能为空")
    private String executeCmd;

    @ApiModelProperty(value = "草稿ID",  example = "UUID")
    private Long draftId;

    @ApiModelProperty(value = "审批意见",  example = "不错不错！")
    private String comment;

    @ApiModelProperty("用户Id")
    private String userId;

    @ApiModelProperty(value = "会签点审批结果", notes = "Y代表同意，N代表不同意，只有会签点才有这个结论")
    private String multiResult;

    @ApiModelProperty("用户名称")
    private String userName;

    @ApiModelProperty("流程变量信息")
    private Map<String, Object> processVariables;

    @ApiModelProperty("局部变量信息")
    private Map<String, Object> taskLocalVariables;

    @ApiModelProperty("审批人")
    private String assignee;

    @ApiModelProperty(value = "节点集合", notes = "适用于多个节点需要回退的")
    private List<String> sourceKeyList;

    @ApiModelProperty(value = "目标节点", notes = "退回、撤回到的目标节点")
    private String targetKey;

    @ApiModelProperty(value = "审批人租",notes = "多个审批人，会签用")
    private List<String> assigneeList;

    @ApiModelProperty("候选人")
    private String candidateUser;

    @ApiModelProperty("候选人多个")
    private List<String> candidateUserList;

    @ApiModelProperty("候选组")
    private String candidateGroup;

    @ApiModelProperty("候选组多个")
    private List<String> candidateGroupList;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty(value = "委派标识")
    private String delegationState;

}
